package com.example.myFirstWebmagic.company.entity;

import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.ElementCollection;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import com.example.myFirstWebmagic.util.JsonObject;

/**
 * 
 * ClassName: Company 
 * @Description: 企业
 * @author xiongyao
 * @date 2017年3月23日
 */
@Entity
@Table(name="En_Company")
public class Company extends JsonObject implements Serializable{
	
	/**
	 * @Fields serialVersionUID : TODO
	 */
	private static final long serialVersionUID = 1L;
	/**
	 * 企业ID
	 */
	@Id
	private String id;
	/**
	 * 企业介绍
	 */
	@Column(columnDefinition="TEXT")
	private String info;
	/**
	 * 名称
	 */
	@Column
	private String name;
	/**
	 * 法人
	 */
	@Column
	private String legalPerson;
	/**
	 * 公司地址
	 */
	@Column
	private String address;
	/**
	 * 组织机构编码
	 */
	@Column
	private String code;
	/**
	 * 网址
	 */
	@Column
	private String website;
	/**
	 * 所属行业 
	 */
	@Column
	private String industry;
	/**
	 * 污染源类型
	 */
	@Column
	private String pollutantSourceType;
	/**
	 * 生产周期
	 */
	@Column
	private String productionCycle;
	/**
	 * 联系人
	 */
	@Column
	private String contactMan;
	/**
	 * 联系电话
	 */
	@Column
	private String contactPhone;
	
	/**
	 * 自行监测方案
	 */
	@OneToOne(cascade={CascadeType.PERSIST, CascadeType.REMOVE})
	private CompanyJcfa companyJcfa;
	
	/**
	 * 监测数据
	 */
	@ElementCollection
	private Set<CompanyJcsj> companyJcsjs=new HashSet<CompanyJcsj>();
	
	

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getInfo() {
		return info;
	}

	public void setInfo(String info) {
		this.info = info;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getLegalPerson() {
		return legalPerson;
	}

	public void setLegalPerson(String legalPerson) {
		this.legalPerson = legalPerson;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getWebsite() {
		return website;
	}

	public void setWebsite(String website) {
		this.website = website;
	}

	public String getIndustry() {
		return industry;
	}

	public void setIndustry(String industry) {
		this.industry = industry;
	}

	public String getPollutantSourceType() {
		return pollutantSourceType;
	}

	public void setPollutantSourceType(String pollutantSourceType) {
		this.pollutantSourceType = pollutantSourceType;
	}

	public String getProductionCycle() {
		return productionCycle;
	}

	public void setProductionCycle(String productionCycle) {
		this.productionCycle = productionCycle;
	}

	public String getContactMan() {
		return contactMan;
	}

	public void setContactMan(String contactMan) {
		this.contactMan = contactMan;
	}

	public String getContactPhone() {
		return contactPhone;
	}

	public void setContactPhone(String contactPhone) {
		this.contactPhone = contactPhone;
	}

	public CompanyJcfa getCompanyJcfa() {
		return companyJcfa;
	}

	public void setCompanyJcfa(CompanyJcfa companyJcfa) {
		this.companyJcfa = companyJcfa;
	}

	public Set<CompanyJcsj> getCompanyJcsjs() {
		return companyJcsjs;
	}

	public void setCompanyJcsjs(Set<CompanyJcsj> companyJcsjs) {
		this.companyJcsjs = companyJcsjs;
	}


	public Company() {
		
	}
	
	
	
}
